package com.ziytek.web.citizen.model.rsp;

import com.ziytek.web.citizen.constant.ServerConstant;
import com.ziytek.web.citizen.enums.ResponseEnum;
import lombok.Data;

/**
 * @author fenghx
 * @version 1.0
 * @className IpSetResponse
 * Description:
 * @date 2024/3/13 10:12
 */
@Data
public class UnifyResponse {
    /**
     * 返回编码
     */
    private String retCode;

    /**
     * 编码描述
     */
    private String retMsg;


    public void error(String retMsg) {
        this.retMsg = retMsg;
        this.retCode = ServerConstant.ERROR;
    }

    public void success() {
        this.retMsg = ResponseEnum.SUCCESS.getDesc();
        this.retCode = ServerConstant.SUCCESS;
    }
}
